<?php
/**
 * Created by PhpStorm.
 * User: user1
 * Date: 2018/6/1
 * Time: 15:06
 */

namespace app\common\validate;


class AuthValidate extends BaseValidate
{
    protected $rule = [
        'name'  =>  'require',
        'nav_name'  =>  'require',
        'type' => 'require|in:1,2,3',
        'parent_id' => 'require',
        'order' => 'require|max:9999',
        'status' => 'require|in:1,2'
    ];

    protected $message = [
        'name.require' => '请输入权限名称',
        'nav_name.require' => '请输入菜单显示名称',
        'type.require' => '请选择权限类型',
        'type.in' => '权限类型错误',
        'parent_id.require' => '请选择上级权限',
        'status.require' => '请选择权限状态',
        'status.in' => '权限状态错误',
        'order.require' => '请输入权限权重值',
        'order.max' => '权限权重值最大9999',
    ];
}